// 6_5.c Returnning a Value

#include <stdio.h>
int main()
{
    #define MAXCOUNT 4

    float tempConvert(float ); /*the function prototype*/

    int count;    /*start of variable declarations*/
    float celsius,fahren;

    for(count=1; count<=MAXCOUNT; count++)
    {
        printf("Enter a Fahrenheit temperature: ");
        scanf("%f",&fahren);
        printf("The Celsius equivalent is %5.2f\n",tempConvert(fahren));
    }

    return 0;
}

/*convert fahrenheit to celsius*/
float tempConvert(float inTemp)
{
    return((5.0/9.0)*(inTemp-32.0));
}